class Ob:
    def __init__(self, *args, **kwargs):
        self.name = args[0]
        self.a = ["1", "2"]

    def __str__(self, *args, **kwargs):
        return str(self.a)

    def __setitem__(self, key, value):
        self.a[key] = value

    def __mul__(self, other):
        if isinstance(other, int) and other > 0:
            self.a = self.a * other
            return self.a
        else:
            raise TypeError("Scalar must be an integer")

    def __len__(self):
        return len(self.a)

    def __delitem__(self, key):
        del self.a[key]

    def __hash__(self):
        return hash(self.name)

    def __eq__(self, other):
        if isinstance(other, Ob) and self.name == other.name:
            return self.a
        raise TypeError("Type is not same")

    def __repr__(self):
        return f'<{self.__class__.__name__} name={self.name} items={self.a}>'


a = Ob('tom')
b = Ob('tom')
print('a: ', a)
a[0] = 'a'
print('a: ', a)
a * 3
print('len: ', len(a))
del a[1]
print('a: ', a)
print('set: ', {a, b})

